package com.ericbutler.info.domain;

import java.util.Date;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

public class TestRecord {
	private String id;
	private String user;
	private String text;
	private Date updatedDate;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}

	@Override
	public int hashCode() {
		return new HashCodeBuilder(3, 17).append(id).append(user).append(text).append(updatedDate).hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}
		if (obj == this) {
			return true;
		}
		if (!(obj instanceof TestRecord)) {
			return false;
		}

		TestRecord that = (TestRecord) obj;
		return new EqualsBuilder().append(id, that.id).append(user, that.user).append(text, that.text).append(updatedDate, that.updatedDate).isEquals();
	}

	@Override
	public String toString() {
		return "TestRecord:\n" + "Id - " + this.id + "\n" + "User - " + this.user + "\n" + "Text - " + this.text + "\n" + "Updated Date - " + this.updatedDate;
	}
}
